When converting HTML to space, convert newlines (and successive whitespace) to single...
authorrobertl <robertl>
Mon, 19 Jun 2006 20:47:05 +0000 (20:47 +0000)
committerrobertl <robertl>
Mon, 19 Jun 2006 20:47:05 +0000 (20:47 +0000)
util.c

diff --git a/util.c b/util.c
index cb115058aebef20325e79ee912dedb0918de3ff4..4ce933aa7dc487d769b1bfee0ce3a02b92d6a087 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1194,10 +1194,15 @@ strip_html(const utf_string *in)
                }
                
                if (! tag[0]) {
-                       if (*instr == '\n')
+                       if (*instr == '\n') {
                                *out++ = ' ';
-                       else
+                               do {
+                                       instr++;
+                               } while (isspace(*instr));
+                               continue;
+                       } else {
                                *out++ = *instr;
+                       }
                }
                else {
                        if (taglen < (sizeof(tag)-1)) {